package com.UnionPayCenter.entity;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @program: UnionPayCenter
 * @description: 优惠券
 * @author BaoJF
 *
 */
@EqualsAndHashCode(callSuper = false)
@Data
@Table(name = "discount_coupon_type")
public class CouponEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "优惠券类型id")
    @Column(name = "dis_type_id")
    private Integer disTypeId;

    @Column(name = "b_id")
    @ApiModelProperty(value = "商户id")
    private Integer bId;

    @Column(name = "dis_name")
    @ApiModelProperty(value = "优惠券名称")
    private String disName;

    @Column(name = "valid_days")
    @ApiModelProperty(value = "有效天数")
    private Integer validDays;

    @Column(name = "limit_used")
    @ApiModelProperty(value = "是否限制使用次数:01一次性使用;00无限使用")
    private String LimitUsed;

    @Column(name = "used_count")
    @ApiModelProperty(value = "限制使用次数")
    private Integer usedCount;

    @Column(name = "re_used")
    @ApiModelProperty(value = "是否支持重复持有:00支持,01不支持")
    private String reUsed;

    @Column(name = "limit_time")
    @ApiModelProperty(value = "是否限时使用:00限时,01永久有效")
    private String limitTime;

    @Column(name = "min_amount")
    @ApiModelProperty(value = "起用金额(单位：分)")
    private Integer minAmount;

    @Column(name = "max_amount")
    @ApiModelProperty(value = "最高优惠金额(单位：分)")
    private Integer maxAmount;

    @Column(name = "start_date")
    @ApiModelProperty(value = "使用有效期开始-日期")
    private String startDate;

    @Column(name = "end_date")
    @ApiModelProperty(value = "使用有效期结束-日期")
    private String endDate;

    @Column(name = "start_time")
    @ApiModelProperty(value = "使用有效期开始-时间")
    private String startTime;

    @Column(name = "end_time")
    @ApiModelProperty(value = "使用有效期结束-时间")
    private String endTime;

    @Column(name = "type")
    @ApiModelProperty(value = "赠送类型:注册送01,充值送02,手动赠送03,消费送04,会员卡05,其他06")
    private String type;

    @Column(name = "dis_type")
    @ApiModelProperty(value = "优惠类型:00满减,01折扣")
    private String disType;

    @Column(name = "limit_stock")
    @ApiModelProperty(value = "是否限制库存数量：00限制数量,01不限数量")
    private String limitStock;

    @Column(name = "left_stock")
    @ApiModelProperty(value = "剩余库存")
    private Integer leftStock;

    @Column(name = "stock")
    @ApiModelProperty(value = "总库存")
    private Integer stock;

    @Column(name = "pre_start")
    @ApiModelProperty(value = "赠送起始条件")
    private Integer preStart;

    @Column(name = "pre_end")
    @ApiModelProperty(value = "赠送结束条件")
    private Integer preEnd;

    @Column(name = "pr_lev")
    @ApiModelProperty(value = "使用默认优先级")
    private Integer prLev;

    @Column(name = "url")
    @ApiModelProperty(value = "优惠券图片url")
    private Integer url;

    @Column(name = "num")
    @ApiModelProperty(value = "满减金额(单位：分)/折扣")
    private Integer num;

    @Column(name = "time_start")
    @ApiModelProperty(value = "优惠区间限时-开始")
    private String timeStart;

    @Column(name = "time_end")
    @ApiModelProperty(value = "优惠区间限时-结束")
    private String timeEnd;

    @Column(name = "create_time")
    @ApiModelProperty(value = "添加时间")
    private Timestamp createTime;

    @JsonIgnore
    @Column(name = "update_time")
    @ApiModelProperty(value = "修改时间")
    private Timestamp updateTime;

    @Column(name = "remark")
    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "停启标志 1启用 0 停用")
    @Column(name = "valid_tag")
    private String validTag;
}
